package com.andy.qi.domain;

import java.util.UUID;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "t_users")
public class User {

    @Id
    private String userId;
    private String account;
    private String name;
    private int sex;
    private String headimg;
    private int lv;
    private int exp;
    private int coins;
    private int gems;
    private String roomid;
    private String history;
    
    
    protected User() {
    }


    public User(String userId, String account) {
        this.userId = userId;
        this.account = account;
    }


    public String getUserId() {
        return userId;
    }


    public String getAccount() {
        return account;
    }


    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }


    public int getSex() {
        return sex;
    }


    public void setSex(int sex) {
        this.sex = sex;
    }


    public String getHeadimg() {
        return headimg;
    }


    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }


    public int getLv() {
        return lv;
    }


    public void setLv(int lv) {
        this.lv = lv;
    }


    public int getExp() {
        return exp;
    }


    public void setExp(int exp) {
        this.exp = exp;
    }


    public int getCoins() {
        return coins;
    }


    public void setCoins(int coins) {
        this.coins = coins;
    }


    public int getGems() {
        return gems;
    }


    public void setGems(int gems) {
        this.gems = gems;
    }


    public String getRoomid() {
        return roomid;
    }


    public void setRoomid(String roomid) {
        this.roomid = roomid;
    }


    public String getHistory() {
        return history;
    }


    public void setHistory(String history) {
        this.history = history;
    }
    
    public static String genId() {
        return UUID.randomUUID().toString().replace("-", "");
    }
}
